﻿using CommunityToolkit.Mvvm.ComponentModel;
using DependencyInjectionHelperLib;
using Microsoft.Extensions.DependencyInjection;

namespace MeterReader.ViewModels
{
    public class ViewModelLocator
    {
        public ObservableObject? MainWindowViewModel =>
            DIContainer.Default.GetServiceProvider().GetService<MainWindowViewModel>();

        public ObservableObject? MetersDataMonitorViewModel =>
            DIContainer.Default.GetServiceProvider().GetService<MetersDataMonitorViewModel>();

        public ObservableObject? MetersCurveViewModel =>
            DIContainer.Default.GetServiceProvider().GetService<MetersCurveViewModel>();

        public ObservableObject? HistoryViewModel =>
       DIContainer.Default.GetServiceProvider().GetService<HistoryViewModel>();
    }
}